#!/bin/bash

SIZE="100 500 1000 10000" 
THREADS="1 2 4 8 16 32"
#ITERATIONS=100
ITERATIONS=1
DATATYPE="0 1"
PAROUT="parout" 
DAT=".dat"

echo "Start"
for i in $THREADS
do
	echo "" > ./dat/$PAROUT$i"_float"$DAT
	echo "" > ./dat/$PAROUT$i"_double"$DAT
	for j in $SIZE
	do	
		echo "Size: " $j "/10000" " Threads: " $i "/32"
		for k in $DATATYPE
		do
			if [ $k -eq 0 ]
			then
				echo "Datatype float"
				./mvmult $j $i $k $ITERATIONS >> ./dat/$PAROUT$i"_float"$DAT
			elif [ $k -eq 1 ]
			then
				echo "Datatype double"
				./mvmult $j $i $k $ITERATIONS >> ./dat/$PAROUT$i"_double"$DAT
			fi
		done
	done
done
